import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Regex {

	public static void main(String[] args) {
		// 201521123107
		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNextLine()) {
			System.out.println(Test(scanner.nextLine()));
		}	
		scanner.close();
	}

	public static boolean Test(String str) {
		Pattern p =  Pattern.compile("[0-9]*");
		Matcher m = p.matcher(str);
		if(!m.matches()){
			return false;
		}
		return true;
	}
}
